package com.bwie.MQ;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @className: MailProducer
 * @Description: TODO
 * @version: v1.８.0
 * @author: GONGWENXUE
 * @date: 2025/10/10 22:24
 */
@Component
public class MailProducer {
//
//    @Resource
//    private RabbitTemplate rabbitTemplate;
//
//    public void sendFollowRemindMail(Long businessId, List<Long> userIds) {
//        // 构造消息体（包含商机ID、用户ID列表）
//        Map<String, Object> msg = new HashMap<>();
//        msg.put("businessId", businessId);
//        msg.put("userIds", userIds);
//        rabbitTemplate.convertAndSend("business.exchange", "business.follow.key", msg);
//    }
    @RabbitListener(queuesToDeclare = @Queue(name = "aaa"))
    private void  sendFollowRemindMail(String message){
        System.out.println("111"+message);
    }
}